// Learn TypeScript:
//  - https://docs.cocos.com/creator/manual/en/scripting/typescript.html
// Learn Attribute:
//  - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
//  - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html

const {ccclass, property} = cc._decorator;

@ccclass
export default class NewClass extends cc.Component {

    // 确认、删除、添加 按钮
    @property(cc.Button)
    submit: cc.Button = null
    @property(cc.Button)
    delete: cc.Button = null
    @property(cc.Button)
    add: cc.Button=null
    
    @property(cc.Node)
    up_node: cc.Node = null;
    
    submit_btn(event:cc.Event.EventTouch){
        console.log('submit 跳转结果界面')
        cc.director.loadScene('result');
    }
    delete_btn(event:cc.Event.EventTouch){
        
    }
    add_btn(event:cc.Event.EventTouch){

    }
    onLoad () {
        this.submit.node.on(cc.Node.EventType.TOUCH_END, this.submit_btn, this);
        this.delete.node.on(cc.Node.EventType.TOUCH_END, this.delete_btn,this);
        this.add.node.on(cc.Node.EventType.TOUCH_END, this.add_btn,this);
    }

    start () {
    }

    update (dt) {}
}
